import * as types from './mutation-types'

export const addNote = function ({commit}) {
  commit(types.ADD_NOTE)
}
export const editNote = function ({commit}, text) {
  commit(types.EDIT_NOTE, text)
}
export const deleteNote = function ({commit}, note) {
  commit(types.DELETE_NOTE)
}
export const updateActiveNote = function({commit}, note) {
  commit(types.SET_ACTIVE_NOTE, note)
}
export const toggleFavorite = function({commit}) {
  commit(types.TOGGLE_FAVORITE)
}